package com.qs.auto.dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import com.qs.core.dao.GenericDAOImpl;

public class QuotesDAOImpl extends GenericDAOImpl implements QuotesDAO{
	
	@Override
	public String getCarName(String id) throws Exception{
		Connection conn = null;
		String returnName=null;
		try{
			conn = getConnection();
			String query = "select "+id+" from dual";
			Statement stmt = conn.createStatement();
			ResultSet rs = stmt.executeQuery(query);
			while(rs.next()){
				returnName = rs.getString(1);
			}
		}
		finally{
			if(conn!=null)
				conn.close();
		}		
		return returnName;
	}	
}
